<script language="javascript1.2" src="javascript/vietuni.js"></script>
<script> function initVU (form) { setTypingMode(0); return true; } initVU(document.phpForm);</script>

<script type="text/javascript">
    function submitSendMail(action)
    {
    		var ok = true;
            var frmObj = document.getElementById('phpForm');
            if (ok == true) {
            frmObj.hdAction.value = action;
            frmObj.submit();
    }
    }

// function submitSendMail(action)
//     {

   
//          var mailTo = $('#mailTo');
//          var txttieude = $('#txttieude');
//           var txtnoidung = $('#txtnoidung');
         
      
//         var dataString = 'hdAction_=' + action;
//         dataString += '&mailTo=' + mailTo.val();
//         dataString += '&txttieude=' + txttieude.val();
//         dataString += '&txtnoidung=' + txtnoidung.val();
//         // alert(dataString);
//         $.ajax({
//             url: '',
//             type: "POST",
//             data: dataString,
//             cache: false,
//             success: function(data) {

//                  tmp= data.split("SendMail+#####+");  
//                 if (tmp[1] == 'OK') {
//                     alert('Gửi phản hồi thành công');
//                     //  window.location.reload();
//                        window.history.go(-1);
                    
//                 }
//                 else{   alert('Gửi phản hồi thất bại');}
//             }
//         });
        
            
    
       


//     } 

</script>
<style type="text/css">
	a.btt-complete {

    background: none repeat scroll 0% 0% #9F224E;
    border: medium none;
    cursor: pointer;
}

a.btt-complete:link,
a.btt-complete:visited
{

    text-align: center;
   
    padding: 5px;
    font: 500 13px arial;
    color: #Fff;
    text-decoration: none;          
}


</style>

 <form method="post" name="phpForm" id="phpForm">

<div id="toolbar-box">
    <div class="d_divide5"></div>
    <div class="toolbar" id="toolbar">
        <table class="toolbar"><tr>

               
                <td class="button" id="toolbar-trash">
                    <a href="javascript:history.go(-1)" >
                       <span title="Trở về">
                            <img src="template/default/images/icons/48/back.png" height="40" width="40">

                            </span>
                    </a> 
                </td>
               

            </tr></table>
    </div>
    <div class="header icon_48_contact">Quản lý thông tin liên hệ</div>
    <div class="d_divide5"></div>

</div>

<div class="d_divide10"></div>
<div class="d_clear"></div>
<div id="element-box">

 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
	<td width="1%" align="left" valign="top"></td>
	<td width="79%" valign="top">

		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr> 
			  <td>&nbsp;</td>
			</tr>
			<tr> 
			  <td><font face="Verdana" size="2" style="padding: 20px " color="#FF0000">Trả lời thông tin khách hàng yêu cầu </font></td>
			</tr>
			<tr> 
			  <td>
			<?php
			include("../protected/dbconnect.php");
			$sql = "SELECT `contacts`.`CT_Email`, `contacts`.`CT_Title` FROM `contacts` where CT_ID = ?";
			$cmd = $mysqli->prepare($sql);
			$cmd->bind_param("s", $_GET["id"]);
			$cmd->execute();
			$cmd->bind_result($email, $title);
			if($cmd->fetch()){
			?>
				<FORM name="phpForm" method="post">
				
					<table width="50%" border="0" align="center" cellpadding="5" cellspacing="5" bordercolor="#006699" bgcolor="#EBFCEF" class="gopy" style="border-left:0px solid #CCCCCC; border-right:0px solid #CCCCCC; ">
						<tr >
							<td width="100%" height="19" colspan="2" bgcolor="#E8E8E8"  >
							<font face="Verdana" size="2">Chọn kiểu gõ Tiếng Việt:</font>
							<font face="Verdana" color="#0909FF">
							<INPUT onfocus=setTypingMode(1) type=radio value=TELEX name=switcher>
							</font>
				
							<font face="Verdana" size="2">Telex</font><font face="Verdana" color="#0909FF">
							<INPUT onfocus=setTypingMode(2) type=radio value=Vni name=switcher>
							</font>
							<font face="Verdana" size="2">VNI</font>
							<font face="Verdana" color="#0909FF">
							<INPUT onfocus=setTypingMode(0) type=radio value=OFF name=switcher checked>
							</font>
							<font face="Verdana" size="2">Bỏ chọn kiểu gõ</font>
				
							</td>
							</tr>
							<tr>
							<td colspan="2" bordercolor="#FFFFFF">
								<?php if(isset($_GET["msg"])){
									echo $_GET["msg"];
								} ?>
							</td>
						</tr>
						<tr>
							<td nowrap bordercolor="#FFFFFF" style="color:red">Email To :</td>
							<td ><input type="text" name="mailTo"  id="mailTo" value="<?php echo $email; ?>" size="35" onkeyup="initTyper(this);"></td>
				
						</tr>
						<tr>
							<td nowrap bordercolor="#FFFFFF" style="color:red">Tiêu đề:</td>
							<td><input type="text" name="txttieude" id="txttieude"  value="Re: <?php echo $title; ?>" size="35" onkeyup="initTyper(this);"></td>
						</tr>
						<tr>
							<td valign="top" nowrap bordercolor="#FFFFFF" style="color:red">Nội dung:</td>
							<td valign="top" bordercolor="#006699"><textarea name="txtnoidung"  id="txtnoidung" cols="60" rows="10"  onkeyup="initTyper(this);"></textarea></td>
				
						</tr>
				
						<tr>
							<td bordercolor="#FFFFFF">&nbsp;</td>
							<td bordercolor="#FFFFFF">
							<!-- <input type="submit" name="sendmailBtn" value="  send  "> -->
							<a class="btt-complete" href="javascript:void()" onclick="submitSendMail('sendmailphanhoi')">Hoàn tất</a>
									
						</tr>
					</table>
					<input type="hidden" name="hidden" value="reply_contact" />
					  <input type="hidden" name="hdAction"/>
					<input type="hidden" name="id" value="<?php echo $_GET["id"] ?>" />
					<input type="hidden" name="task"/>
					<?php } ?>
				</form>
					
			</td>
		</tr>
		<tr> 
		  <td>
		  </td>
		</tr>
		
		
		<tr>

		  <td>&nbsp;</td>
		</tr>
	  </table></td>
  </tr>
</table></td>
</tr>       
</table>

</div>
<noscript>
!Cảnh báo! Javascript phải được bật để chạy được các chức năng trong phần Quản trị				
</noscript>

</form>










